﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Logout : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Response.Expires = 0;
        this.Response.Cache.SetCacheability(HttpCacheability.NoCache);

        try
        {
            FormsAuthentication.SignOut();
        }
        catch (Exception)
        {
            
            throw;
        }
        this.Response.Cookies[FormsAuthentication.FormsCookieName].Expires = DateTime.Today.AddDays(-1);
        Response.Cookies.Clear();
        Session.Abandon();
        Session.Clear();

        Response.Redirect(Resources.PageURLs.SignInPageURL);
    }
}
